package com.sdy.approval.biz.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.sdy.approval.biz.mapper.TpApproveFlowConfigMapper;
import com.sdy.approval.biz.model.TpApproveFlowConfig;
import com.sdy.approval.biz.service.TpApproveFlowConfigService;
import com.sdy.mvc.service.impl.BaseServiceImpl;

import lombok.extern.slf4j.Slf4j;

/**
 * <p>
 * 流程配置 服务实现类
 * </p>
 *
 * @author cgj
 * @since 2019-08-09
 */
@Slf4j
@Service
public class TpApproveFlowConfigServiceImpl extends BaseServiceImpl<TpApproveFlowConfig> implements TpApproveFlowConfigService {
    @Autowired
    private TpApproveFlowConfigMapper tpApproveFlowConfigMapper;

	@Override
	public Integer getMaxFlowId() {
		return tpApproveFlowConfigMapper.selectMaxFlowId();
	}

	@Override
	public List<TpApproveFlowConfig> selectTpApproveFlowConfig(String resId) {
		return tpApproveFlowConfigMapper.selectApprveFlowConfig(resId);
	}

	@Override
	public TpApproveFlowConfig selectByResIdAndCurrentFlowLink(String resId, int currentFlowLink) {
		log.info("resId--"+resId);
		return tpApproveFlowConfigMapper.findByResIdAndCurrentFlowLink(resId, currentFlowLink);
	}
}
